Program Listing for File visualization.h
↰ Return to documentation for file (codes/slam/utility/visualization.h
)
/*******************************************************
* Copyright (C) 2019, Robotics Group, Nanyang Technology University
*
* This file is part of sslam.
*
* Licensed under the GNU General Public License v3.0;
* you may not use this file except in compliance with the License.
*
* Author: Zhang Handuo (hzhang032@e.ntu.edu.sg)
*******************************************************/
#pragma once
#include <ros/ros.h>
#include <std_msgs/Header.h>
#include <std_msgs/Float32.h>
#include <std_msgs/Bool.h>
#include <sensor_msgs/Imu.h>
#include <sensor_msgs/PointCloud.h>
#include <sensor_msgs/Image.h>
#include <sensor_msgs/image_encodings.h>
#include <cv_bridge/cv_bridge.h>
#include <nav_msgs/Path.h>
#include <nav_msgs/Odometry.h>
#include <geometry_msgs/PointStamped.h>
#include <geometry_msgs/PoseWithCovarianceStamped.h>
#include <visualization_msgs/Marker.h>
#include <tf/transform_broadcaster.h>
#include "CameraPoseVisualization.h"
#include <eigen3/Eigen/Dense>
#include "../estimator/estimator.h"
#include "../estimator/parameters.h"
#include <fstream>
extern ros::Publisher pub_odometry;
extern ros::Publisher pub_path, pub_pose;
extern ros::Publisher pub_cloud, pub_map;
extern ros::Publisher pub_key_poses;
extern ros::Publisher pub_ref_pose, pub_cur_pose;
extern ros::Publisher pub_key;
extern nav_msgs::Path path;
extern ros::Publisher pub_pose_graph;
extern int IMAGE_ROW, IMAGE_COL;
using namespace slam_estimator;
void fake_publish(const std_msgs::Header &header, int n); //< Keeps publishing topics even in kidnapped mode
void registerPub(ros::NodeHandle &n);
void pubLatestOdometry(const Eigen::Vector3d &P, const Eigen::Quaterniond &Q, const Eigen::Vector3d &V, double t);
void pubTrackImage(const cv::Mat &imgTrack, const double t);
void printStatistics(const Estimator &estimator, double t);
void pubOdometry(const Estimator &estimator, const std_msgs::Header &header);
void pubInitialGuess(const Estimator &estimator, const std_msgs::Header &header);
void pubKeyPoses(const Estimator &estimator, const std_msgs::Header &header);
void pubCameraPose(const Estimator &estimator, const std_msgs::Header &header);
void pubPointCloud(const Estimator &estimator, const std_msgs::Header &header);
void pubTF(const Estimator &estimator, const std_msgs::Header &header);
void pubKeyframe(const Estimator &estimator, const std_msgs::Header &header);
void pubRelocalization(const Estimator &estimator);
void pubCar(const Estimator &estimator, const std_msgs::Header &header);